package com.cicadamob.contact.api.group.asynctask;

import com.cicadamob.contact.api.group.bean.Group;
import com.cicadamob.contact.api.group.dao.Group_Db_Dao;

import android.content.Context;
import android.os.Handler;

public class LoadGroupName implements Runnable {
	
	private Handler mHandler;
	private int what;
	private Context mContext;
	private String groupID;
	public LoadGroupName(Handler mHandler,int what,Context mContext,String groupID){
		this.mHandler=mHandler;
		this.what=what;
		this.mContext=mContext;
		this.groupID=groupID;
	}

	@Override
	public void run() {
		// TODO Auto-generated method stub
		Group_Db_Dao dbHelper=Group_Db_Dao.getInstance(mContext);
		Group group = dbHelper.queryGroupNameAndImage(groupID);
		mHandler.obtainMessage(what, group).sendToTarget();
	}

}
